package com.db.controller;

import com.db.service.SysLogService;
import com.db.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/log/")
public class SysLogController {

	@Autowired
	private SysLogService sysLogService;

	@RequestMapping("doFindPageObjects")
	public SysResult doFindPageObjects(String username, Long pageCurrent) {
		return new SysResult(sysLogService.findObjects(username, pageCurrent));
	}

	@RequestMapping("doDeleteById")
	public SysResult doDeleteById(Long... id) {
		sysLogService.deleteById(id);
		return new SysResult("delete ok");
	}
}
